home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Resources
/
Chat & Communication
/
Digsby build 37
/
digsby_setup.exe
/
lib
/
gui
/
notifications
/
sounds.pyo
(
.txt
)
< prev
Wrap
Python Compiled Bytecode
|
2008-10-13
|
2KB
|
51 lines
# Source Generated with Decompyle++
# File: in.pyo (Python 2.5)
from __future__ import with_statement
from gui import skin
import syck
class SoundsetException(Exception):
pass
class Soundset(dict):
pass
DESC_FILENAME = 'sounds.yaml'
from gui.notifications import underscores_to_dots
def fix_paths(d, soundset_dir):
for k, v in d.iteritems():
d[k] = (soundset_dir / v).abspath()
_soundset = None
def active_soundset():
global _soundset
if _soundset is not None:
return _soundset
_soundset = load_soundset('default')
return _soundset
def load_soundset(name):
soundsetdir = skin.resourcedir() / 'sounds' / name
soundset_yaml = soundsetdir / DESC_FILENAME
if not soundset_yaml.exists():
raise SoundsetException('soundset %r is missing %r' % (name, DESC_FILENAME))
try:
f = _[2]
soundset = syck.load(f)
finally:
pass
underscores_to_dots(soundset)
fix_paths(soundset, soundsetdir)
return Soundset(soundset)